package com.party.admin.task;

import com.party.admin.biz.cMember.CMemberBizService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


/**
 * @Description: 社群会员状态更新
 * @Author: hqh
 * @Date: 2020/11/09 15:45
 */
@Component(value = "QuartzRefreshMemberStatus")
public class QuartzRefreshMemberStatus {
    @Autowired
    private CMemberBizService cMemberBizService;

    private static Logger logger = LoggerFactory.getLogger(QuartzRefreshMemberStatus.class);

    /**
     * 社群会员状态更新
     * ---每天凌晨1点 运行一次
     */
    public void refresh(){

        try {
            cMemberBizService.refreshExpirationStatus();
        }catch (Exception e){
            logger.error("社群会员状态更新---异常");
        }
    }
}
